package com.hzw.saas.api.hpc.query;

import cn.hutool.core.util.ReUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.checkerframework.checker.regex.qual.Regex;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @author sonam
 * @sine 2021/12/23 12:34 下午
 */
@Data
@ApiModel("创建青云试用合同参数")
public class QingCloudContractTrialQuery {

    @ApiModelProperty(value = "hpc用户名")
    @NotBlank(message = "hpc用户名不能为空")
    @Pattern(regexp = "^[a-z]([a-z0-9]|[_]){1,8}$", message = "HPC用户名，1-8个字符，可包含字母，数字，下划线")
    private String hpcAccount;

    @ApiModelProperty(value = "slurm账号名")
    @NotBlank(message = "slurm账号名不能为空")
    private String slurmAccount;

    @NotNull(message = "试用核时不能为空")
    @ApiModelProperty(value = "试用核时")
    @Min(value = 0, message = "请输入正确的核时")
    private Double coreTime;

    @ApiModelProperty(value = "过期天数")
    @Min(value = 1, message = "请输入正确的过期天数")
    private Integer expireDay;

    @NotBlank(message = "用户ID不能为空")
    @ApiModelProperty(value = "用户ID")
    private String userId;

 }
